﻿
Partial Class pages_datas_usercontrols_UCDataHeading
    Inherits System.Web.UI.UserControl

    'Interface
    Public Sub Display(ByVal column As EData)
        btn.Text = column.ToString()
        btn.CommandArgument = CData.GetPropertyName(column)
    End Sub
    Public Sub Display(ByVal column As EDecision)
        btn.Text = column.ToString()
        btn.CommandArgument = CData.GetPropertyName(column)
        btn.ToolTip = CData.GetTooltip(column)
    End Sub

    'Event Bubbling
    Public Event Resort(ByVal sender As Object, ByVal e As EventArgs)
    Protected Sub btn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn.Click
        RaiseEvent Resort(sender, e)
    End Sub

    Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
        If btn.CommandArgument = CWeb.RequestStr("sortBy") Then btn.Style.Add("text-decoration", "underline")
    End Sub
End Class
